<#include "../common/layout.ftl"/>
<@layout>
<div class="well">

	<form id="form1" method="post" action="/vipmember/operator" class="form-inline">
		<span class="label label-success">vip会员充值记录</span><br/>
		<input type="hidden" value="1" id="type" name="type"/>
		姓名:<input type="text" class="input-medium" style="height: 26" placeholder="姓名" name="real_name"  value="${real_name!""}"/>
		手机号：<input type="text" class="input-medium" style="height: 26" placeholder="手机号" name="cell_phone" value="${cell_phone!""}"/> 
		充值时间：
		<input type="text" class="input-medium" style="height: 26" placeholder="开始时间" name="startTime" value="${startTime!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>到
		<input type="text" class="input-medium" style="height: 26" placeholder="结束时间" name="endTime" value="${endTime!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>
		(格式：yyyy-MM-dd,如：2013-05-01)
		<#if session.userRole == 'admin' || session.userRole == 'brandManager'>
			<button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i>查询</button>
		</#if>
	</form>
  </div>

<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
		  	<th>ID</th>
		  	<th>会员名称</th>
		    <th>会员手机</th>
			<th>分公司代码</th>
			<th>充值金额</th>
			<th>充值后余额</th>
			<th>充值类型</th>
			<th>充值时间</th>
			<th>操作人</th>
			<th>备注</th>
		  </tr>
		</thead>
		<tbody>
		<#list page.list as deposit>
		  <tr>
		  	<td>
			  ${deposit.id!""}
			</td>
			<td>
			  ${deposit.user_name!""}
			</td>
		    <td>
			  ${deposit.user_phone!""}
			</td>
			<td>
			  ${deposit.company!""}
			</td>
			<td>
				<#if deposit.mat??>
			  		￥${deposit.mat?string(",##0.00")}
			  	<#else>
			  		￥0.0
			  	</#if>
			</td>
			<td>
			  ￥${deposit.after_balance?string(",##0.00")}
			</td>
			<td>
			  <#if deposit.deposit_type??>
				  <#if deposit.deposit_type == "CASH">
				  	<span class="label label-info">现金</span>
				  <#elseif deposit.deposit_type == "WECHAT">
				  	<span class="label label-warning">微信</span>
				  <#elseif deposit.deposit_type == "ALIPAY">
				  	<span class="label label-success">支付宝</span>
				  <#else>
				  	<span class="label label-inverse">其他</span>
				  </#if>
			  <#else>
			  	<span class="label label-info">现金</span>
			  </#if>
			</td>
			<td>
				<#if deposit.create_time??> 
			     ${deposit.create_time?string("yyyy-MM-dd HH:mm:ss") }  
			    </#if>
			</td>
			<td>
				${deposit.sys_name!""}
			</td>
			<td>
				${deposit.remark!"" }
			</td>
		  </tr>
		</#list>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/vipmember/operator/" urlParas="?type=2&reall_name=${real_name?if_exists}&cell_phone=${cell_phone?if_exists}&startTime=${startTime?if_exists}&endTime=${endTime?if_exists}"  />
</div>
 <script>
function excel() {
  document.getElementById('form1').action= '/recharge/excel';
  document.getElementById('form1').submit();
}
</script>
<script type="text/javascript" src="/js/wdatePicker/WdatePicker.js"></script>
</@layout>